Return to start page

This function I discovered myself (and with the help of Captain Griffen). Simply put, if your actually playing a game, it will return true HOWEVER if your viewing the game as a replay it will return false. The function has been tested in MultiPlayer and it now causes no desyncs (by tested I mean vigorously tested by IceFrog for like 3 months). There is only one downside, and that is the function uses up one pause. There might be a second version of the function that doesn't use up a pause (discovered by Strilanc) however there are a couple of issues with it How does it work? Simply put a replay is just a file that contains the inputs from the various players when playing a game. However when Wc3 views a replay, there are differences then if you were physically playing the game. One of the differences is pausing. If you are actually playing and you pause a game, it is paused. However during a replay, if you pause a game the replay simply finishes at the point you paused the game, if the game is resumed some time later then the replay completely skips the pause phase. There are only a few things that work in real time during pauses when your playing the game (anything else you do during the pause just gets 'suspended' until the game is resumed). The 2 things that work in real time are camera angles and trigger sleep action. The function works by moving the camera during the pause. If the camera is moved during the pause, then you are playing the actual game. If the camera isn't moved then it is the replay (since the pause phase is totally skipped) - It is HIGHLY recommended that you save the returning value of the function into a boolean variable i.e. set someboolean = IsInGame() So you only call the function once (since it takes up a pause)

Brief Description

-

Source File

Core/General/Library Game.j

Object

IsInGame

Authors

See Objects

-

Todos

-